﻿using GolSig.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Test.GolSig.Library.BoardSizeSpecs
{
    
    
  

        [TestClass()]
        public class WhenCreatingBoardSize
        {





            [TestMethod(), ExpectedException(typeof(ArgumentOutOfRangeException))]
            public void giveInvalidRow_shouldRaiseException()
            {
                int rows = 0;
                int columns = 1;
                BoardSize target = new BoardSize(rows, columns);
                Assert.Fail("Expected exception");
            }


            [TestMethod(), ExpectedException(typeof(ArgumentOutOfRangeException))]
            public void giveInvalidColumn_shouldRaiseException()
            {
                int rows = 1;
                int columns = 0;
                BoardSize target = new BoardSize(rows, columns);
                Assert.Fail("Expected exception");
            }


            [TestMethod()]
            public void giveValidInput_RowAndColumShouldBeCorrect()
            {
                int rows = 1;
                int columns = 1;
                BoardSize target = new BoardSize(rows, columns);
                Assert.IsTrue(target.Rows == rows );
                Assert.IsTrue(target.Columns == columns );

            }
        }
 
}
